import hilog from '@ohos.hilog';

class Logger {
  private domain: number;
  private prefix: string;
  private format: string = "%{public}s, %{public}s";

  constructor(prefix: string) {
    this.prefix = prefix;
    this.domain = 0xFF00;
  }

  debug(...args: Any[]) {
    hilog.debug(this.domain, this.prefix, this.format, ...args);
  }

  info(...args: Any[]) {
    hilog.info(this.domain, this.prefix, this.format, ...args);
  }

  warn(...args: Any[]) {
    hilog.warn(this.domain, this.prefix, this.format, ...args);
  }

  error(...args: Any[]) {
    hilog.error(this.domain, this.prefix, this.format, ...args);
  }
}

export default new Logger('[CameraSample]');